﻿using System;
using System.Collections.Generic;

using System.ComponentModel;
using Flagwind.ComponentModel;

namespace Flagwind.Web
{
	/// <summary>
	/// 包含为 API 定义的状态码。
	/// </summary>
	public enum ApiStatusCode
	{
		/// <summary>
		/// 成功。
		/// </summary>
		[Description("${Api.Success.Message}")]
		[Alias("${Api.Success.Code}")]
		Success,

		/// <summary>
		/// 失败。
		/// </summary>
		[Description("${Api.Failure.Message}")]
		[Alias("${Api.Failure.Code}")]
		Failure,

		/// <summary>
		/// 参数无效。
		/// </summary>
		[Description("${Api.InvalidParam.Message}")]
		[Alias("${Api.InvalidParam.Code}")]
		InvalidParam,

		/// <summary>
		/// 会话丢失。
		/// </summary>
		[Description("${Api.SessionLost.Message}")]
		[Alias("${Api.SessionLost.Code}")]
		SessionLost,

		/// <summary>
		/// 凭证无效。
		/// </summary>
		[Description("${Api.InvalidCredential.Message}")]
		[Alias("${Api.InvalidCredential.Code}")]
		InvalidCredential,

		/// <summary>
		/// 未授权访问。
		/// </summary>
		[Description("${Api.Unauthorized.Message}")]
		[Alias("${Api.Unauthorized.Code}")]
		Unauthorized,

		/// <summary>
		/// 签名错误。
		/// </summary>
		[Description("${Api.InvalidSign.Message}")]
		[Alias("${Api.InvalidSign.Code}")]
		InvalidSign,

		/// <summary>
		/// 服务器错误。
		/// </summary>
		[Description("${Api.ServerError.Message}")]
		[Alias("${Api.ServerError.Code}")]
		ServerError
	}
}
